import { defineConfig,loadEnv } from 'vite'
import createVitePlugins from './vite/plugins'


export default defineConfig(({ mode, command }) => {
    const env = loadEnv(mode, process.cwd())
    return {
        base: './',
        build: {
            minify: true,
            outDir: 'dist',
        },
        server: {
            port: '3002'
        },
        plugins: createVitePlugins(env, command === 'build'),
        exclude:[
            /\/README\.md$/,
        ]
    }
})